//基础类型
let str: string = ''
let mun: number = 1
let bol: boolean = true
let n: null = null
let u: undefined = undefined

//数组类型
let arr1: string[] = ['1', '2', '3']
let arr2: number[] = [1, 2, 3]
let arr3: boolean[] = [true, false]
let arr4: {
    name: string,
    age: number
}[] = [
        {
            name: 'srh',
            age: 19
        },
        {
            name: 'ljy',
            age: 20
        }
    ]

let fun = (can1: number, can2: number): number => {
    return can1 + can2
}

//元数组类型
let arr: [string, number, boolean] = ['1', 2, true]

//枚举类型
enum Color { Red = 1, Green, Blue }
let colorName: string = Color[2];
console.log(colorName)